package top.stmo.spring.ioc.test1.dao.impl;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import top.stmo.spring.ioc.test1.dao.BookDao;

public class BookDaoImpl implements BookDao, InitializingBean, DisposableBean {

    private String username;

    @Override
    public void save() {
        System.out.println("book dao save");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("BookDao afterPropertiesSet");
    }

    public void init() {
        System.out.println("BookDao init");
    }

    public void destroy() {
        System.out.println("BookDao destroy");
    }

    public void aaa() {
        System.out.println("name:" + username);
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
